/* 自定义样式 */

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 步骤指示器样式 */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 20px 0;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    transition: color 0.3s ease;
}

.step.active .step-circle {
    background-color: #0d6efd;
    color: white;
}

.step.active .step-label {
    color: #0d6efd;
    font-weight: bold;
}

.step.completed .step-circle {
    background-color: #198754;
    color: white;
}

.step.completed .step-label {
    color: #198754;
}

/* 文件上传区域样式 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

/* 步骤面板样式 */
.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 字段列表样式 */
.field-list {
    background-color: #f8f9fa;
}

.field-item {
    padding: 8px 12px;
    margin: 4px 0;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.field-item:hover {
    background-color: #e9ecef;
    border-color: #0d6efd;
}

.field-item.selected {
    background-color: #cfe2ff;
    border-color: #0d6efd;
    color: #0a58ca;
}

.field-item.mapped {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 映射关系样式 */
.mapping-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 4px 0;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.mapping-arrow {
    color: #0d6efd;
    font-weight: bold;
}

.mapping-remove {
    color: #dc3545;
    cursor: pointer;
    padding: 4px;
}

.mapping-remove:hover {
    background-color: #f8d7da;
    border-radius: 4px;
}

/* 数据表格样式 */
.table-responsive {
    border: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td {
    font-size: 14px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 进度条样式 */
.progress {
    height: 8px;
    border-radius: 4px;
}

.progress-bar {
    border-radius: 4px;
}

/* 加载遮罩样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Toast 通知样式 */
.toast {
    min-width: 300px;
}

.toast-header {
    font-weight: 600;
}

/* 业务规则配置样式 */
.rule-group {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
}

.rule-group h6 {
    color: #495057;
    margin-bottom: 12px;
    font-weight: 600;
}

.rule-item {
    margin-bottom: 10px;
}

.rule-item:last-child {
    margin-bottom: 0;
}

/* 下载选项样式 */
.download-option {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    transition: all 0.2s ease;
}

.download-option:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-option .download-title {
    font-weight: 600;
    color: #495057;
}

.download-option .download-description {
    font-size: 14px;
    color: #6c757d;
    margin-top: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .progress-steps {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        flex: 1;
        min-width: 80px;
    }
    
    .upload-area {
        padding: 20px 15px;
    }
    
    .card-body {
        padding: 15px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .upload-area {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .upload-area:hover {
        background-color: #2a4365;
        border-color: #3182ce;
    }
    
    .field-list {
        background-color: #2d3748;
    }
    
    .field-item {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in-right {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 工具提示样式 */
.tooltip-inner {
    background-color: #2d3748;
    font-size: 12px;
}

.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #2d3748;
}

/* 表单控件增强 */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* 按钮组合样式 */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.success {
    background-color: #198754;
}

.status-indicator.error {
    background-color: #dc3545;
}

.status-indicator.warning {
    background-color: #ffc107;
}

.status-indicator.info {
    background-color: #0dcaf0;
}

/* 数据统计卡片 */
.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}